import type { App } from "vue";
import {useUserInfoStore} from '@/stores/userInfo'
function btpermission(app:App){
    app.directive('has',{
        mounted(node,bindings){
            // console.log(node,bindings);
            
            if (!useUserInfoStore().userInfo.buttons.includes(bindings.value)) {
                node.parentNode.removeChild(node)
            }
        }
    })
}

export default btpermission